import request from '@/utils/request'

// 获取全部信息
export function getBuildingAllApi() {
    return request({
        url: '/community',
        method: 'get',
    })
}

// 获取楼栋列表
export function getBuildingListApi(params) {
    return request({
        url: '/house/building',
        method: 'get',
        params
    })
}

// 获取楼栋详情
export function getBuildingInfoApi(id) {
    return request({
        url: '/house/building/'+id,
        method: 'get',
    })
}

// 新增数据
export function addBuildingApi(data) {
    return request({
        url: '/house/building',
        method: 'post',
        data
    })
}

// 修改数据
export function editBuildingApi(data) {
    return request({
        url: '/house/building/'+data.id,
        method: 'put',
        data
    })
}

// 删除数据
export function delBuildingApi(id) {
    return request({
        url: '/house/building/'+id,
        method: 'delete',
    })
}